From: Mathieu Westphal Date: Tue, 13 Oct 2026 10:08:50 +0000 (+0200) Subject: vtkGLTFDocumentLoader: Fix an invalid access for CVE-2025-57107 X-Git-Tag: archive/raspbian/9.6.2+ds-3+rpi1^2~8 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=c3142fe2fa44b37abe5e8f25db04ce1c273afb45;p=vtk9.git vtkGLTFDocumentLoader: Fix an invalid access for CVE-2025-57107 Origin: upstream, https://gitlab.kitware.com/vtk/vtk/-/commit/0aafd788bb920719f875f16ea1149712aa9099df Bug-Debian: https://bugs.debian.org/1119822 Gbp-Pq: Name cve_2025_57107.patch --- diff --git a/IO/Geometry/vtkGLTFDocumentLoader.cxx b/IO/Geometry/vtkGLTFDocumentLoader.cxx index f1fe4ea61..aa4eaf23a 100644 --- a/IO/Geometry/vtkGLTFDocumentLoader.cxx +++ b/IO/Geometry/vtkGLTFDocumentLoader.cxx @@ -704,6 +704,13 @@ bool vtkGLTFDocumentLoader::ExtractPrimitiveAttributes(Primitive& primitive) // Load all attributes for (auto& attributePair : primitive.AttributeIndices) { + if (attributePair.second < 0 || + attributePair.second >= static_cast(this->InternalModel->Accessors.size())) + { + vtkErrorMacro("Invalid accessor index: " << attributePair.second); + return false; + } + Accessor accessor = this->InternalModel->Accessors[attributePair.second]; // Create array if (attributePair.first == "JOINTS_0")